﻿CREATE TABLE [dbo].[ArticoleParteneri] (
    [IDArticol]         INT          NOT NULL,
    [IDPartener]        BIGINT       NOT NULL,
    [CodArticol]        VARCHAR (50) NOT NULL,
    [IDVariantaArticol] INT          CONSTRAINT [DF_ArticoleParteneri_IDVariantaArticol] DEFAULT ((0)) NULL,
    CONSTRAINT [PK_ArticoleParteneri] PRIMARY KEY CLUSTERED ([IDArticol] ASC, [IDPartener] ASC),
    CONSTRAINT [FK_ArticoleParteneri_Articole] FOREIGN KEY ([IDArticol]) REFERENCES [dbo].[Articole] ([IDArticol]),
    CONSTRAINT [FK_ArticoleParteneri_ArticoleVariante] FOREIGN KEY ([IDVariantaArticol]) REFERENCES [dbo].[ArticoleVariante] ([IDVariantaArticol]),
    CONSTRAINT [FK_ArticoleParteneri_Parteneri] FOREIGN KEY ([IDPartener]) REFERENCES [dbo].[Parteneri] ([IDPartener])
);

